{{extend "tutorial_layout.html"}}

{{block content}}
{{use "codemirror"}}

<div class="container-fluid">
    {{block link-nav}}
    <ul class="breadcrumb">
      <li>
        <a href="/tutorial">返回</a> <span class="divider">/</span>
      </li>
      <li>
        <a href="/tutorial/read/{{=object.id}}">{{=object.title}}</a> <span class="divider">/</span>
      </li>
      <li class="active">
        {{block page-nav}}添加新章节{{end}}
      </li>
    </ul>
    {{end}}

    <div class="row-fluid">
        <div class="span8">
            <div class="outter">
                <h2 class="section">{{block page-title}}添加新章节{{end}}</h2>
                <div>
                {{<< form}}
                </div>
            </div>
        </div>
        <div class="span4">
            {{block before_album}}{{tutorial_id = object.id}}{{end}}
            {{include "TutorialView/inc_album.html"}}
        </div>
    </div>
</div>
    
<script>
    $(function(){
        var myCodeMirror = CodeMirror.fromTextArea($('#field_content').get(0), {
            matchBrackets: true,
            theme: "default"
          });
    });
</script>
{{end}}